Release 10.1A: OpenEdge Development:
Progress 4GL Handbook


Creating and using dynamic browses

Especially when you start using dynamic temp-tables and defining their fields at run time, you will want to be able to define a dynamic browse objects to display their contents. You can also use a dynamic browse if you have a dynamic query on a database table that isn’t known until run time, or anytime the column list of the browse needs to be definable at run time.

Much like a dynamic temp-table, you define a dynamic browse in stages, first defining the browse object itself with the CREATE BROWSE statement, and then adding columns to it in separate statements.

At run time, you can also add columns to a static browse control and define the query for a static browse.

You create the browse with this statement:

CREATE BROWSE browse-handle [ IN WIDGET-POOL pool-name ] 
     [ ASSIGN attribute = value [ , ... ]. 

As with other dynamic objects, if you don’t assign a value to the attributes in the CREATE statement you can set them later on using the browse handle.

Attributes you can set for a dynamic browse include:

You must set a browse’s query handle before you can add columns to the browse, and you must parent it to a frame before you can visualize it.

A dynamic browse always has the NO-ASSIGN quality, meaning that Progress is not able to automatically save changes you make to enabled columns in the browse. This is because the browse is completely defined at run time, and Progress can’t anticipate and supply default behavior for column assignment at compile time. However, in a distributed application you would never make direct changes to a database table from a browse anyway, so the utility of the static browse that can do auto-assignment of changes is very limited.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095